<template>
  <div class="wrapper">
    <div class="inner" v-html="result"></div>
  </div>  
</template>

<script>
  export default {
    name: 'operatorReport',
    data () {
      return {
        userId: '',
        result: ''
      }
    },
    created () {
      this.$Spin.show();
      this.userId = this.$route.query.userId;
      this.render();
    },
    methods: {
      render () {
        this.$http.get(`/helsinki/admin/risk/getUserCarrierReportHtml?userId=${this.userId}`)
        .then(({ body: { errcode, info, data } }) => {
          if (errcode == 0) {
            this.result = data.html;
            this.$Spin.hide();
          } else {
            this.$Message.error(info);
          }
        }, error => {
          console.log(error);
        });
      }
    }
  }
</script>

<style>

</style>
